<?php 
foreach($dealer_list->result() as $row)
{ 
?>
<h1 class="blue">
<?php
    echo $row->company;
?>
    <span class="car-detail">
<?php
    if($row->province)
        echo " (" . $row->province . ")";
?>
    </span>
</h1>
<div class="modelGroup">  
    <div  class= "modelItem">
        <div>
        <img width="112px" height="84px" src="<?php echo base_url()?>assets/members/<?php echo $row->photo; ?>" />
        <table cellspacing="0" cellpadding="0">
            <tbody>
                <tr>
                    <td valign="top">
                        <!--
                        <div class="data-point">      
                            <span class="label">Service:</span>
                            <span class="data">
<?php
                                echo $service_list;
?>
                            </span>      
                        </div>
                        -->
                        <div class="data-point">               
                            <span class="label">Company phone:</span>         
                            <span class="data">
<?php
                                echo $row->company_phone_1 . ', ' . $row->company_phone_2;
?>
                            </span>      
                        </div>
                        <div class="data-point">               
                            <span class="label">Email:</span>         
                            <span class="data">
<?php
                                echo $row->email;
?>
                            </span>      
                        </div>
                        <div class="data-point">      
                            <span class="label">Website:</span>
                            <span class="data">
<?php
                                echo $row->website;
?>                                        
                            </span>      
                        </div>
                        <div class="data-point">               
                            <span class="label">Location:</span>         
                            <span class="data">
<?php
                                echo $row->province . ' (' . $row->district . ')';
?>
                            </span>      
                        </div>
                    </td>
                    <td valign="top">
                        <div class="data-point">               
                            <span class="label">Address:</span>         
                            <span class="data">
<?php
                                echo $row->address;
?>                                        
                            </span>      
                        </div>   
                        <div class="data-point">               
                            <span class="label">Contact:</span>         
                            <span class="data">
<?php
                                echo $row->dealer_name;
?>
                            </span>      
                        </div>   
                        <div class="data-point">               
                            <span class="label">Phone:</span>         
                            <span class="data">
<?php
                                echo $row->contact_phone_1 . ', ' . $row->contact_phone_2;
?>                                        
                            </span>      
                        </div>   
                        <div class="data-point">      
                            <span class="label">Occupation:</span>
                            <span class="data">
<?php
                                echo $row->occupation;
?>
                            </span>      
                        </div>
                        <div class="data-point">               
                            <span class="label">Description:</span>         
                            <span class="data">
<?php
                                echo $row->description;
?>
                            </span>      
                        </div>   
                    </td>
                </tr>
            </tbody>
        </table>      
        </div>
    </div>
</div>
<div style="clear:both;">
    <br>
    <br>
</div>
<h1 class="blue">
    Car(s):
</h1>
<div class="modelGroup">     
<?php 
    $this->load->view('templates/car/car_list'); 
?> 
</div>
<div style="clear:both;">
    <br>
    <br>
</div>
<h1 class="blue">
    Service(s):
</h1>
<div class="modelGroup">     
    <ul class="service">
<?php 
    foreach($service_list->result() as $row)
    {   
        echo "<li>";
        echo $row->service_name;
        //echo anchor("/index.php/service/detail/" . $row->service_name, $row->service_name);
        echo "</li>";
    }
?> 
    </ul>
</div>
<div style="clear:both">
    <br>
    <br>
</div>
<h1 class="blue">
    Part(s):
</h1>
<div class="modelGroup">     
    <ul class="part">
<?php 
    //$this->load->view('templates/car/car_list'); 
    foreach($part_list->result() as $row)
    {   
        echo "<li>";
        echo $row->part_name;
        //echo anchor("/index.php/part/detail/" . $row->part_name, $row->part_name);
        echo "</li>";
    }
?> 
    </ul>
</div>
<?php
}
?>